# -coding: utf-8 
# 

import subprocess
import os

app_path = "D:\\pdf2htmlEX-win32-0.14.6-upx-with-poppler-data\\pdf2htmlEX.exe"

file_path = 'G:\\guangzhou\\'

det = 'G:\\pdf'


# subprocess.call()
# 
file_all_name = [file_path + i for i in os.listdir(file_path)]

for i, file_name in enumerate(file_all_name):
	print(file_name)
	det_name = det + '\\' + str(i)
	command = ''.join([app_path, ' ', file_name, ' ', '--dest-dir ', det_name])
	subprocess.call(command)
	# print(command)

